package com.zzzyh.redisbyspring;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MyController {
    @Autowired
    public StringRedisTemplate stringRedisTemplate;


    @RequestMapping("/test")
    public void test() {
        stringRedisTemplate.opsForValue().set("test", "test");
    }
}
